var searchService = Components.classes["@mozilla.org/browser/search-service;1"].getService().QueryInterface(Components.interfaces.nsIBrowserSearchService);
if (searchService.getEngineByName(name) == null) {
if (p_Subject.id == "{75623d5d-4683-402a-b610-ac4bab767c86}") {
try {
var searchService = Components.classes["@mozilla.org/browser/search-service;1"].getService().QueryInterface(Components.interfaces.nsIBrowserSearchService);
var engine = searchService.getEngineByName('Surf Canyon');
if (engine) {
searchService.removeEngine(engine);
}
} catch (e1) {
}
var url = "http://www.surfcanyon.com/search/uninstall.jsp";
try {
var prefsBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).getBranch("surfcanyon.");
var partnerCode = prefsBranch.getCharPref("partner_code");
if (partnerCode && (partnerCode.toLowerCase() != 'oneriot')) {